3.1.53 \(\int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx\) [53]

3.1.53.1 Optimal result
3.1.53.2 Mathematica [A] (verified)
3.1.53.3 Rubi [A] (verified)
3.1.53.4 Maple [C] (verified)
3.1.53.5 Fricas [A] (verification not implemented)
3.1.53.6 Sympy [F]
3.1.53.7 Maxima [B] (verification not implemented)
3.1.53.8 Giac [B] (verification not implemented)
3.1.53.9 Mupad [B] (verification not implemented)

3.1.53.1 Optimal result

Integrand size = 21, antiderivative size = 84 \[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\sec (c+d x)}{a d}-\frac {\sec ^3(c+d x)}{a d}+\frac {3 \sec ^5(c+d x)}{5 a d}-\frac {\sec ^7(c+d x)}{7 a d}+\frac {\tan ^7(c+d x)}{7 a d} \]

output
sec(d*x+c)/a/d-sec(d*x+c)^3/a/d+3/5*sec(d*x+c)^5/a/d-1/7*sec(d*x+c)^7/a/d+ 
1/7*tan(d*x+c)^7/a/d
 
3.1.53.2 Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.74 \[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\sec ^5(c+d x) (2912-7620 \cos (c+d x)+3760 \cos (2 (c+d x))-3810 \cos (3 (c+d x))+1440 \cos (4 (c+d x))-762 \cos (5 (c+d x))+80 \cos (6 (c+d x))+2432 \sin (c+d x)-1905 \sin (2 (c+d x))+320 \sin (3 (c+d x))-1524 \sin (4 (c+d x))+960 \sin (5 (c+d x))-381 \sin (6 (c+d x)))}{17920 a d (1+\sin (c+d x))} \]

input
Integrate[Tan[c + d*x]^6/(a + a*Sin[c + d*x]),x]
 
output
(Sec[c + d*x]^5*(2912 - 7620*Cos[c + d*x] + 3760*Cos[2*(c + d*x)] - 3810*C 
os[3*(c + d*x)] + 1440*Cos[4*(c + d*x)] - 762*Cos[5*(c + d*x)] + 80*Cos[6* 
(c + d*x)] + 2432*Sin[c + d*x] - 1905*Sin[2*(c + d*x)] + 320*Sin[3*(c + d* 
x)] - 1524*Sin[4*(c + d*x)] + 960*Sin[5*(c + d*x)] - 381*Sin[6*(c + d*x)]) 
)/(17920*a*d*(1 + Sin[c + d*x]))
 
3.1.53.3 Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.81, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3185, 3042, 3086, 210, 2009, 3087, 15}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^6(c+d x)}{a \sin (c+d x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (c+d x)^6}{a \sin (c+d x)+a}dx\)

\(\Big \downarrow \) 3185

\(\displaystyle \frac {\int \sec ^2(c+d x) \tan ^6(c+d x)dx}{a}-\frac {\int \sec (c+d x) \tan ^7(c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \sec (c+d x)^2 \tan (c+d x)^6dx}{a}-\frac {\int \sec (c+d x) \tan (c+d x)^7dx}{a}\)

\(\Big \downarrow \) 3086

\(\displaystyle \frac {\int \sec (c+d x)^2 \tan (c+d x)^6dx}{a}-\frac {\int \left (\sec ^2(c+d x)-1\right )^3d\sec (c+d x)}{a d}\)

\(\Big \downarrow \) 210

\(\displaystyle \frac {\int \sec (c+d x)^2 \tan (c+d x)^6dx}{a}-\frac {\int \left (\sec ^6(c+d x)-3 \sec ^4(c+d x)+3 \sec ^2(c+d x)-1\right )d\sec (c+d x)}{a d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\int \sec (c+d x)^2 \tan (c+d x)^6dx}{a}-\frac {\frac {1}{7} \sec ^7(c+d x)-\frac {3}{5} \sec ^5(c+d x)+\sec ^3(c+d x)-\sec (c+d x)}{a d}\)

\(\Big \downarrow \) 3087

\(\displaystyle \frac {\int \tan ^6(c+d x)d\tan (c+d x)}{a d}-\frac {\frac {1}{7} \sec ^7(c+d x)-\frac {3}{5} \sec ^5(c+d x)+\sec ^3(c+d x)-\sec (c+d x)}{a d}\)

\(\Big \downarrow \) 15

\(\displaystyle \frac {\tan ^7(c+d x)}{7 a d}-\frac {\frac {1}{7} \sec ^7(c+d x)-\frac {3}{5} \sec ^5(c+d x)+\sec ^3(c+d x)-\sec (c+d x)}{a d}\)

input
Int[Tan[c + d*x]^6/(a + a*Sin[c + d*x]),x]
 
output
-((-Sec[c + d*x] + Sec[c + d*x]^3 - (3*Sec[c + d*x]^5)/5 + Sec[c + d*x]^7/ 
7)/(a*d)) + Tan[c + d*x]^7/(7*a*d)
 

3.1.53.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 210
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^2 
)^p, x], x] /; FreeQ[{a, b}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3086
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_.), x_Symbol] :> Simp[a/f   Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 
), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 
] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])
 

rule 3087
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S 
ymbol] :> Simp[1/f   Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + 
f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n - 1) 
/2] && LtQ[0, n, m - 1])
 

rule 3185
Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[1/a   Int[Sec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x 
] - Simp[1/(b*g)   Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /; Fre 
eQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]
 
3.1.53.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 1.31 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.98

method result size
risch \(\frac {\frac {2 i}{7}-\frac {10 \,{\mathrm e}^{i \left (d x +c \right )}}{7}+2 \,{\mathrm e}^{11 i \left (d x +c \right )}+2 \,{\mathrm e}^{9 i \left (d x +c \right )}-\frac {52 \,{\mathrm e}^{5 i \left (d x +c \right )}}{35}+\frac {6 \,{\mathrm e}^{3 i \left (d x +c \right )}}{7}+\frac {36 \,{\mathrm e}^{7 i \left (d x +c \right )}}{5}+2 i {\mathrm e}^{10 i \left (d x +c \right )}+\frac {22 i {\mathrm e}^{2 i \left (d x +c \right )}}{7}+\frac {52 i {\mathrm e}^{4 i \left (d x +c \right )}}{7}+\frac {52 i {\mathrm e}^{6 i \left (d x +c \right )}}{5}+6 i {\mathrm e}^{8 i \left (d x +c \right )}}{\left (-i+{\mathrm e}^{i \left (d x +c \right )}\right )^{5} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{7} d a}\) \(166\)
derivativedivides \(\frac {-\frac {2}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {9}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) \(175\)
default \(\frac {-\frac {2}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {9}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) \(175\)

input
int(tan(d*x+c)^6/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
 
output
2/35*(5*I-25*exp(I*(d*x+c))+35*exp(11*I*(d*x+c))+35*exp(9*I*(d*x+c))-26*ex 
p(5*I*(d*x+c))+15*exp(3*I*(d*x+c))+126*exp(7*I*(d*x+c))+35*I*exp(10*I*(d*x 
+c))+55*I*exp(2*I*(d*x+c))+130*I*exp(4*I*(d*x+c))+182*I*exp(6*I*(d*x+c))+1 
05*I*exp(8*I*(d*x+c)))/(-I+exp(I*(d*x+c)))^5/(exp(I*(d*x+c))+I)^7/d/a
 
3.1.53.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.13 \[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {5 \, \cos \left (d x + c\right )^{6} + 15 \, \cos \left (d x + c\right )^{4} - 5 \, \cos \left (d x + c\right )^{2} + 2 \, {\left (15 \, \cos \left (d x + c\right )^{4} - 10 \, \cos \left (d x + c\right )^{2} + 3\right )} \sin \left (d x + c\right ) + 1}{35 \, {\left (a d \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )^{5}\right )}} \]

input
integrate(tan(d*x+c)^6/(a+a*sin(d*x+c)),x, algorithm="fricas")
 
output
1/35*(5*cos(d*x + c)^6 + 15*cos(d*x + c)^4 - 5*cos(d*x + c)^2 + 2*(15*cos( 
d*x + c)^4 - 10*cos(d*x + c)^2 + 3)*sin(d*x + c) + 1)/(a*d*cos(d*x + c)^5* 
sin(d*x + c) + a*d*cos(d*x + c)^5)
 
3.1.53.6 Sympy [F]

\[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\tan ^{6}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]

input
integrate(tan(d*x+c)**6/(a+a*sin(d*x+c)),x)
 
output
Integral(tan(c + d*x)**6/(sin(c + d*x) + 1), x)/a
 
3.1.53.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 338 vs. \(2 (78) = 156\).

Time = 0.20 (sec) , antiderivative size = 338, normalized size of antiderivative = 4.02 \[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {32 \, {\left (\frac {2 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {4 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {5 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {20 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 1\right )}}{35 \, {\left (a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {4 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {10 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {5 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {20 \, a \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {20 \, a \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {5 \, a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {10 \, a \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + \frac {4 \, a \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} - \frac {2 \, a \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - \frac {a \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}}\right )} d} \]

input
integrate(tan(d*x+c)^6/(a+a*sin(d*x+c)),x, algorithm="maxima")
 
output
32/35*(2*sin(d*x + c)/(cos(d*x + c) + 1) - 4*sin(d*x + c)^2/(cos(d*x + c) 
+ 1)^2 - 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 5*sin(d*x + c)^4/(cos(d* 
x + c) + 1)^4 + 20*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 1)/((a + 2*a*sin( 
d*x + c)/(cos(d*x + c) + 1) - 4*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 10 
*a*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 5*a*sin(d*x + c)^4/(cos(d*x + c) 
+ 1)^4 + 20*a*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 20*a*sin(d*x + c)^7/(c 
os(d*x + c) + 1)^7 - 5*a*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 + 10*a*sin(d* 
x + c)^9/(cos(d*x + c) + 1)^9 + 4*a*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 
- 2*a*sin(d*x + c)^11/(cos(d*x + c) + 1)^11 - a*sin(d*x + c)^12/(cos(d*x + 
 c) + 1)^12)*d)
 
3.1.53.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (78) = 156\).

Time = 2.21 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.05 \[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {7 \, {\left (25 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 120 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 210 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 140 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 33\right )}}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{5}} - \frac {175 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1260 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3815 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 6020 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4641 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1792 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 281}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{560 \, d} \]

input
integrate(tan(d*x+c)^6/(a+a*sin(d*x+c)),x, algorithm="giac")
 
output
-1/560*(7*(25*tan(1/2*d*x + 1/2*c)^4 - 120*tan(1/2*d*x + 1/2*c)^3 + 210*ta 
n(1/2*d*x + 1/2*c)^2 - 140*tan(1/2*d*x + 1/2*c) + 33)/(a*(tan(1/2*d*x + 1/ 
2*c) - 1)^5) - (175*tan(1/2*d*x + 1/2*c)^6 + 1260*tan(1/2*d*x + 1/2*c)^5 + 
 3815*tan(1/2*d*x + 1/2*c)^4 + 6020*tan(1/2*d*x + 1/2*c)^3 + 4641*tan(1/2* 
d*x + 1/2*c)^2 + 1792*tan(1/2*d*x + 1/2*c) + 281)/(a*(tan(1/2*d*x + 1/2*c) 
 + 1)^7))/d
 
3.1.53.9 Mupad [B] (verification not implemented)

Time = 7.92 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.18 \[ \int \frac {\tan ^6(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {32\,\left (20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{35\,a\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^5\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^7} \]

input
int(tan(c + d*x)^6/(a + a*sin(c + d*x)),x)
 
output
-(32*(2*tan(c/2 + (d*x)/2) - 4*tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2 
)^3 + 5*tan(c/2 + (d*x)/2)^4 + 20*tan(c/2 + (d*x)/2)^5 + 1))/(35*a*d*(tan( 
c/2 + (d*x)/2) - 1)^5*(tan(c/2 + (d*x)/2) + 1)^7)